package com.jed.xxh.adapter;

import android.content.Context;
import android.view.LayoutInflater;
import android.widget.BaseAdapter;

import com.jed.xxh.application.BaseApplication;

import java.util.List;

/**
 * 项目名：SmartButler<br/>
 * 包名：  com.jed.xxh.adapter<br/>
 * 作者：徐晓辉<br/>
 * 创建日期：2018/11/29 16:42<br/>
 * 描述：<br/>
 */
public abstract class MyBaseAdapter extends BaseAdapter {

    protected Context mContext;
    protected LayoutInflater inflater;
    private List mList;

    public MyBaseAdapter(List mList) {
        this.mContext = BaseApplication.getAppContext();
        this.inflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
        this.mList = mList;
    }

    @Override
    public int getCount() {
        return mList.size();
    }

    @Override
    public Object getItem(int position) {
        return mList.get(position);
    }

    @Override
    public long getItemId(int position) {
        return position;
    }
}
